#include <iostream>
#include <vector>
#include <memory>
#include <algorithm>
class Filter {
public:
    virtual ~Filter() {}
    virtual std::string process(const std::string& input) = 0;
};
class CapitalizeFilter : public Filter {
public:
    std::string process(const std::string& input) override {
        std::string output = input;
        std::transform(output.begin(), output.end(), output.begin(), ::toupper);
        return output;
    }
};

class AppendFilter : public Filter {
public:
    std::string process(const std::string& input) override {
        return input + " - Appended";
    }
};
class Pipeline {
private:
    std::vector<std::unique_ptr<Filter>> filters;
public:
    void addFilter(std::unique_ptr<Filter> filter) {
        filters.push_back(std::move(filter));
    }

    std::string process(const std::string& input) {
        std::string data = input;
        for (auto& filter : filters) {
            data = filter->process(data);
        }
        return data;
    }
};
int main() {
    Pipeline myPipeline;
    myPipeline.addFilter(std::make_unique<CapitalizeFilter>());
    myPipeline.addFilter(std::make_unique<AppendFilter>());

    std::string inputData = "hello world";
    std::string result = myPipeline.process(inputData);
    std::cout << "Processed Output: " << result << std::endl;

    return 0;
}